function [result] = inverse_STFT(STFT_array,Param)
% Param 下面的字段：
%   STFT_array: 变换的矩阵
%   window_len:STFT窗宽
%   STEP_T:为了简化计算而设置的STFT时域分辨率
    window_len=Param.window_len;
    STEP_T=Param.STEP_T;
    fft_len=Param.fft_len;
    if(Param.window_type==1)
        win=ones(1,Param.window_len);
    elseif(Param.window_type==2)
        win=ones(1,Param.window_len)./my_hanning_win(Param.window_len);
    else
        win=ones(1,Param.window_len)./my_gaussian_win(Param.window_len,Param.gaussian_param);
    end
    [~,Len_Time] = size(STFT_array);%STFT矩阵的行数是GNSS信号频带内点数，宽度是简化计算后的时间域采样点数
    Len_Of_T = (Len_Time-1)*STEP_T+window_len;
    result=zeros(1,Len_Of_T)+1j*zeros(1,Len_Of_T);%原始时域数据长度
    Coeff = zeros(1,Len_Of_T);
    for i =1:Len_Time%计算每一组时间域的还原片段
       data_temp = STFT_array(:,i)';
       F_temp    = fftshift(data_temp);%先在两端补零再做fftshift，相当于在原来的频域数据中间补零。 
       temp      = ifft(F_temp,fft_len);
       temp      = temp(end-window_len+1:end).*win;
%        temp      = real(temp);
%        subplot(2,1,1)
%        plot(temp(end:-1:1));
%        subplot(2,1,2);
%        plot(chirp_sig((i-1)*STEP_T+1:(i-1)*STEP_T+window_len))
%        pause(0.05);
       result((i-1)*STEP_T+1:(i-1)*STEP_T+window_len)=result((i-1)*STEP_T+1:(i-1)*STEP_T+window_len)+temp(end:-1:1);
       Coeff((i-1)*STEP_T+1:(i-1)*STEP_T+window_len)=Coeff((i-1)*STEP_T+1:(i-1)*STEP_T+window_len)+ones(1,window_len);
    end
    result=result./Coeff;
end
